#include<iostream>
#include<iomanip>
using namespace std;
int main(){
	int star,end;
	int sum=0;
	int count=0;
	
	cin>>star>>end;
	
	int sBak=star;
	while(sBak<=end){
		cout<<setw(5)<<sBak;
		sum+=sBak;
		sBak++;
		count++;
		if(count%5==0){
			cout<<endl;
			count=0;
		}
	}
	if((end-star+1)%5!=0){
		cout<<endl;
	}
	cout<<"Sum = "<<sum<<endl; 
	return 0;
}
